<template>
  <view class="warnObject">
    <treeItem :treeNode="treeData" @click="changeIdx" />
  </view>
</template>

<script>
import treeItem from "./item/treeItem.vue";
export default {
  name: "warnObject",
  components: { treeItem },
  props: {
    // defaultProps: {
    //   type: Object,
    //   default: () => {
    //     return {
    //       id: "id",
    //       name: "name",
    //       children: "children",
    //     };
    //   },
    // },
    treeData: {
      type: Array,
      default: () => [],
    },
  },
  data() {
    return {};
  },
  methods: {
    changeIdx(id) {
      this.$emit("choice", id);
    },
  },
};
</script>

<style lang="scss" scoped>
@import "@/static/common.scss";
.warnObject {
  // @include compress;
}
</style>